$OpenBSD: patch-src_codegen_writexml_xsl,v 1.1 2017/05/27 12:20:43 espie Exp $

Index: src/codegen/writexml.xsl
--- src/codegen/writexml.xsl.orig
+++ src/codegen/writexml.xsl
@@ -15,7 +15,7 @@ xmlChar *toXmlChar(const Context *ctx, const char *fro
 	if (ctx-&gt;convertEncoding) {
 		size_t len = strlen(from_str);
 		iconv_t cd = iconv_open("UTF-8", ctx-&gt;swf_encoding);
-		if (cd &lt; 0) {
+		if (cd == iconv_t(-1)) {
 			fprintf(stderr, "iconv_open failed.\n");
 			return xmlCharStrdup("");
 		}
@@ -163,7 +163,7 @@ void <xsl:value-of select="@name"/>::writeXML( xmlNode
 				tmpstr[l] = 0;
 				xmlNewTextChild( node, NULL, (const xmlChar *)"<xsl:value-of select="@name"/>", (const xmlChar *)tmpstr );
 			}
-			delete tmpstr;
+			delete [] tmpstr;
 		}
 	}
 </xsl:template>
